package org.hfy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.hfy.entity.QuotationItem;

import java.util.List;

/**
 * 报价单明细Mapper接口
 * 
 * @author hfy
 * @version 1.0
 */
@Mapper
public interface QuotationItemMapper extends BaseMapper<QuotationItem> {

    /**
     * 根据报价单ID查询明细列表
     */
    List<QuotationItem> selectByQuotationId(@Param("quotationId") Long quotationId);

    /**
     * 根据报价单ID删除明细
     */
    int deleteByQuotationId(@Param("quotationId") Long quotationId);

    /**
     * 批量插入明细
     */
    int insertBatch(@Param("items") List<QuotationItem> items);

    /**
     * 批量更新明细
     */
    int updateBatch(@Param("items") List<QuotationItem> items);

    /**
     * 查询报价单明细（包含计算和成本信息）
     */
    List<QuotationItem> selectQuotationItemsWithDetailsById(@Param("quotationId") Long quotationId);
} 